<script src="assets/js/user_validate.js" type="text/javascript" charset="utf-8"></script>
<h1>Sign Up</h1>
<?php

$e['serial_first_name']=$auth_session->fb['me']['first_name'];
$e['serial_last_name']=$auth_session->fb['me']['last_name'];
$e['user_email']=$auth_session->fb['me']['email'];
$e['user_fb_uid']=$auth_session->fb['me']['id'];

begin_form('',$id,$next_page,TRUE);

$o['label']='First Name';
p_input('serial_first_name',$o,$e);

$o['label']='Last Name';
p_input('serial_last_name',$o,$e);

$o['label']='Email';
p_input('user_email',$o,$e);


include 'admin/b/autofilluser.php';


$o['label']='user_name';
p_hidden('user_name',$o,$e);
p_hidden('user_fb_uid',$o,$e);
$o['label']='Security Question';
p_input('user_secret',$o,$e);
$o['label']='Security Answer';
p_input('user_answer',$o,$e);

printsubmit("Join Pinoytuner");
end_form($_GET['cmd']);

?>


<script type="text/javascript" charset="utf-8">
	$("#data_form").validate({
			rules: {
				serial_first_name: "required",
				serial_last_name: "required",
				
					user_password: {
						required: true,
						minlength: 5
					},
					confirm_password: {
						required: true,
						minlength: 5,
						equalTo: "#user_password"
					},
				user_email: {
					required: true,
					email: true,
					  remote:'admin/a/email_exists_check.php'  
				}
			
			},
			messages: {
			
				 user_email: {  
	                    remote:jQuery.format("This Email address has been used")
	                }
			}
		});
</script>